<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.prime.com.tr/ui"
	xmlns:t="http://myfaces.apache.org/tomahawk">

<table width="100%" align="center">
	<tr>
		<td align="center" valign="top">
			<h:outputText styleClass="recommendations_title"
			value="#{msg.label_recommendations_only_own_context}" /></td>
		<td align="center" valign="top">
			<h:outputText styleClass="recommendations_title"
			value="#{msg.label_recommendations_all_contexts}" /> <br />
			<br />					
		</td>
	</tr>
	<tr>
		<td align="center" valign="top">
			<p:dataTable var="preference"
				value="#{recommenderBean.booksOnlyOwnContext}">
				<p:column styleClass="book_column">
					<f:facet name="header">
						<h:outputText value="#{msg.label_book}" />
					</f:facet>
					<h:outputText value="#{preference.item.description}" />
				</p:column>
				<p:column styleClass="book_rate_column">
					<f:facet name="header">
						<h:outputText value="#{msg.label_rate}" />
					</f:facet>
					<h:outputText rendered="#{preference.rate eq 5}"
						value="#{msg.label_excellent}" />
					<h:outputText rendered="#{preference.rate eq 4}"
						value="#{msg.label_very_good}" />
					<h:outputText rendered="#{preference.rate eq 3}"
						value="#{msg.label_average}" />
					<h:outputText rendered="#{preference.rate eq 2}"
						value="#{msg.label_below_average}" />
					<h:outputText rendered="#{preference.rate eq 1}"
						value="#{msg.label_bad}" />
				</p:column>
			</p:dataTable>
		</td>
		<td align="center" valign="top">
			<p:dataTable var="preference"
				value="#{recommenderBean.booksWithAllContext}">
				<p:column styleClass="book_column">
					<f:facet name="header">
						<h:outputText value="#{msg.label_book}" />
					</f:facet>
					<h:outputText value="#{preference.item.description}" />
				</p:column>
				<p:column styleClass="book_rate_column">
					<f:facet name="header">
						<h:outputText value="#{msg.label_rate}" />
					</f:facet>
					<h:outputText rendered="#{preference.rate eq 5}"
						value="#{msg.label_excellent}" />
					<h:outputText rendered="#{preference.rate eq 4}"
						value="#{msg.label_very_good}" />
					<h:outputText rendered="#{preference.rate eq 3}"
						value="#{msg.label_average}" />
					<h:outputText rendered="#{preference.rate eq 2}"
						value="#{msg.label_below_average}" />
					<h:outputText rendered="#{preference.rate eq 1}"
						value="#{msg.label_bad}" />
				</p:column>
			</p:dataTable>
			<br />			
		</td>
	</tr>
</table>
</ui:composition>